<?php
define('web_s', 'johnsongod');
require dirname(__FILE__) . '/includes/init.php';
require adminroot.'includes/session.php';
$goods_id = isset($_GET['goods_id']) ? $_GET['goods_id'] : 0;
$r = $db->getAll("select * from m_goods_pic where goods_id = '{$goods_id}' order by id desc");
if($goods_id == '0'){
	foreach($r as $v){
?>
<div style="display:inline;">
	<input name="piclist[]" type="checkbox" checked="checked" value="<?php echo $v['id'];?>" />
	<img src="/images/<?php echo $v['pic_url'];?>" width="50" height="50" />
	<a href="javascript:if(confirm('<?php echo $lan['confirm'].$lan['del'];?>')){gotourl('goods.php?act=delpic&id=<?php echo $v['id'];?>&goods_id=<?php echo $v['goods_id'];?>', 'goods_imglist');}">del</a>
</div>
<?php
	}
}else{
	foreach($r as $v){
?>
<img src="/images/{$pic.pic_url}" width="50" height="50" />
<a href="javascript:if(confirm('<?php echo $lan['confirm'].$lan['del'];?>')){gotourl('goods.php?act=delpic&id=<?php echo $v['id'];?>&goods_id=<?php echo $v['goods_id'];?>', 'goods_imglist');}">del</a>
<?php
	}
}